Learn R Programming

lifecontingencies (version 1.3.12)

multiple life probabilities: Functions to deals with multiple life models

Description

These functions evaluate multiple life survival probabilities, either for joint or last life status. Arbitrary life probabilities can be generated as well as random samples of lifes.

Usage

exyzt(tablesList, x, t = Inf, status = "joint",  type = "Kx", ...)

pxyzt(tablesList, x, t, status = "joint", fractional=rep("linear", length(tablesList)), ...)

qxyzt(tablesList, x, t, status = "joint", fractional=rep("linear",length(tablesList)), ...)

Value

An estimate of survival / death probability or expected lifetime, or a matrix of ages.

Arguments

tablesList

A list whose elements are either lifetable or actuarialtable class objects.

x

A vector of the same size of tableList that contains the initial ages.

t

The duration.

status

Either "joint" for the joint-life status model or "last" for the last-survivor status model (can be abbreviated).

type

Either "Tx" for continuous future lifetime, "Kx" for curtate furture lifetime (can be abbreviated).

fractional

Assumptions for fractional age. One of "linear", "hyperbolic", "constant force" (can be abbreviated).

...

Options to be passed to pxt.

Author

Giorgio Alfredo, Spedicato

Details

These functions extends pxyt family to an arbitrary number of life contingencies.

References

Broverman, S.A., Mathematics of Investment and Credit (Fourth Edition), 2008, ACTEX Publications.

See Also

pxt,exn

Examples

Run this code
#assessment of curtate expectation of future lifetime of the joint-life status
#generate a sample of lifes
data(soaLt)
soa08Act=with(soaLt, new("actuarialtable",interest=0.06,x=x,lx=Ix,name="SOA2008"))
tables=list(males=soa08Act, females=soa08Act)
xVec=c(60,65)
test=rLifexyz(n=50000, tablesList = tables,x=xVec,type="Kx")
#check first survival status
t.test(x=apply(test,1,"min"),mu=exyzt(tablesList=tables, x=xVec,status="joint"))
#check last survival status
t.test(x=apply(test,1,"max"),mu=exyzt(tablesList=tables, x=xVec,status="last"))

Run the code above in your browser using DataLab